!function(window,document,$,undefined) {

   var init = function() {
       initEvent();
   };

   var initEvent = function() {
       $('#newBtn').on('click',onNewBtnClick);
       $('#saveBtn').on('click',onSaveBtnClick);
   };

   var onSaveBtnClick = function() {
       var url = '../server/shopping_goods_add.php';
       var data = {
           title:$('#title').val(),
           price:$('#price').val(),
           details:$('#details').val(),
           amount:$('#amount').val(),
           classify:$('#classify').val(),
           status:$('input[name="status"]:checked').val(),
           pic : 'addr.png'
       };

       console.log(data)

      $.get(url,data,function(response) {

      })
   }

   var onNewBtnClick = function() {
       $('#goodsDlg').modal();
   }




    $(document).ready(init);
}(window,document,jQuery)